package 面向对象中级.继承.作业;

public class HourlyEmployee extends Employee{
    private int hourlySalary;
    private int hours;

    @Override
    public int getSalary(int month) {
        int money=hourlySalary*hours;//小时工资*小时
        if(hours>160){//补发0.5
            //工资=小时工资*小时 +  小时工资*(小时-160)*0.5
            money+=hourlySalary*(hours-160)*0.5;
        }
        return money+month==super.getMonth()?100:0;
    }
}
